package com.shamar.blog.dao;

import com.shamar.blog.entity.BlogCategory;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface BlogCategoryDao {
    /**
     * 根据条件查询用户,可输入的条件有:用户名,用户状态,手机号,邮箱
     * @param blogCategoryCondition
     * @return
     */
    List<BlogCategory> queryCategoryList(@Param("blogCategoryCondition") BlogCategory blogCategoryCondition);

    int deleteByPrimaryKey(Integer id);

    int insert(BlogCategory record);

    /**
     * 根据传入的Category实例新增Category
     * @param record
     * @return
     */
    int insertSelective(BlogCategory record);

    /**
     * 根据id查找BlogCategory对象
     * @param id
     * @return
     */
    BlogCategory selectByPrimaryKey(Integer id);

    /**
     *
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(BlogCategory record);

    /**
     *
     * @param record
     * @return
     */
    int updateByPrimaryKey(BlogCategory record);

    /**
     * 获得所有顶级分类
     * @return
     */
    List<BlogCategory> selectTopCategory();
}